import {createRouter, createWebHistory} from 'vue-router'
import Props from '@/components/pages/01_props/Father.vue'
import Event from '@/components/pages/02_custom-event/Father.vue'
import Bus from '@/components/pages/03_mitt/Father.vue'
import Model from '@/components/pages/04_v-model/Father.vue'
import AttrsListeners from '@/components/pages/05_$attrs/Father.vue'
import RefChildrenParent from '@/components/pages/06_$refs-$parent/Father.vue'
import ProvideInject from '@/components/pages/07_provide-inject/Father.vue'
import Pinia from '@/components/pages/08_pinia/Father.vue'
import Slot from '@/components/pages/09_slot/Father.vue'

export default createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/props',
            component: Props
        },
        {
            path: '/event',
            component: Event
        },
        {
            path: '/mitt',
            component: Bus
        },
        {
            path: '/model',
            component: Model
        },
        {
            path: '/attrs',
            component: AttrsListeners
        },
        {
            path: '/ref-parent',
            component: RefChildrenParent
        },
        {
            path: '/provide-inject',
            component: ProvideInject
        },
        {
            path: '/pinia',
            component: Pinia
        },
        {
            path: '/slot',
            component: Slot,

        },
        {
            path: '/',
            redirect: Props
        }
    ]
})